﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace iTeamyou.LTS.Core.Models
{
	/// <summary>
	/// 生产商
	/// </summary>
	public class Manufacturer
    {
        /// <summary>
        /// 生产商编号
        /// </summary>
        [DisplayName("生产商编号")]
        [Description("生产商编号")]
        [Required(ErrorMessage = "生产商编号不能为空")]
        public string MId { get; set; }

        /// <summary>
        /// 生产商名称
        /// </summary>
        [DisplayName("生产商名称")]
        [Description("生产商名称")]
        [Required(ErrorMessage = "生产商名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 产品类别
        /// </summary>
        [DisplayName("产品类别")]
        [Description("产品类别")]
        [Required(ErrorMessage = "产品类别不能为空")]
        public ProductType ProductType { get; set; }

        /// <summary>
        /// 注册/备案人
        /// </summary>
        [DisplayName("注册/备案人")]
        [Description("注册/备案人")]
        //[Required(ErrorMessage = "化妆品注册/备案人不能为空")]
        public string? Register { get; set; }

        /// <summary>
        /// 境内责任人
        /// </summary>
        [DisplayName("境内责任人")]
        [Description("境内责任人")]
        //[Required(ErrorMessage = "境内责任人不能为空")]
        public string? ResponsiblePerson { get; set; }

        /// <summary>
        /// 注册许可编号
        /// </summary>
        [DisplayName("注册许可编号")]
        [Description("注册许可编号")]
        //[Required(ErrorMessage = "注册许可编号不能为空")]
        public string? RegisterCode { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string? SupplierId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        [Description("创建时间")]
        public DateTime? CreatedOn { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [DisplayName("创建者")]
        [Description("创建者")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 最近更新时间
        /// </summary>
        [DisplayName("最近更新时间")]
        [Description("最近更新时间")]
        public DateTime LastModifiedOn { get; set; }

        /// <summary>
        /// 最近更新者
        /// </summary>
        [DisplayName("最近更新者")]
        [Description("最近更新者")]
        public string LastModifiedBy { get; set; }

        /// <summary>
        /// 生产商证照
        /// </summary>
        [DisplayName("生产商证照")]
        [Description("生产商证照")]
        [Required]
        public List<ManufacturerLicense> ManufacturerLicenses { get; set; }

        /// <summary>
        /// 系统唯一编号
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 证照数
        /// </summary>
        [DisplayName("证照数")]
        [Description("证照数")]
        public int LicenseNum { get; set; }
    }

    /// <summary>
	/// 生产商导出
	/// </summary>
	public class ExportManufacturer
    {
        /// <summary>
        /// 生产商编号
        /// </summary>
        [DisplayName("生产商编号")]
        [Description("生产商编号")]
        public string Id { get; set; }

        /// <summary>
        /// 生产商名称
        /// </summary>
        [DisplayName("生产商名称")]
        [Description("生产商名称")]
        public string Name { get; set; }

        /// <summary>
        /// 注册/备案人
        /// </summary>
        [DisplayName("注册/备案人")]
        [Description("注册/备案人")]
        public string? Register { get; set; }

        /// <summary>
        /// 产品类别
        /// </summary>
        [DisplayName("产品类别")]
        [Description("产品类别")]
        public ProductType? ProductType { get; set; }

        /// <summary>
        /// 境内责任人
        /// </summary>
        [DisplayName("境内责任人")]
        [Description("境内责任人")]
        public string? ResponsiblePerson { get; set; }

        /// <summary>
        /// 注册许可编号
        /// </summary>
        [DisplayName("注册许可编号")]
        [Description("注册许可编号")]
        public string? RegisterCode { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        [Description("创建时间")]
        public DateTime? CreatedOn { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [DisplayName("创建者")]
        [Description("创建者")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 最近更新时间
        /// </summary>
        [DisplayName("最近更新时间")]
        [Description("最近更新时间")]
        public DateTime? LastModifiedOn { get; set; }

        /// <summary>
        /// 最近更新者
        /// </summary>
        [DisplayName("最近更新者")]
        [Description("最近更新者")]
        public string LastModifiedBy { get; set; }

        /// <summary>
        /// 生产商证照
        /// </summary>
        [DisplayName("生产商证照")]
        [Description("生产商证照")]
        [BizDataType("ListURL")]
        public List<string>? ManufacturerLicenseUrl { get; set; }
    }

    /// <summary>
    /// 生产商产品类别
    /// </summary>
    public enum ProductType
    {
        /// <summary>
        /// 化妆品-国产
        /// </summary>
        [Description("化妆品-国产")]
        DomesticCosmetics = 1,

        /// <summary>
        /// 化妆品-进口
        /// </summary>
        [Description("化妆品-进口")]
        ImportedCosmetics = 2,

        /// <summary>
        /// 食品-国产
        /// </summary>
        [Description("食品-国产")]
        DomesticFood = 3,

        /// <summary>
        /// 食品-进口
        /// </summary>
        [Description("食品-进口")]
        ImportedFood = 4,

        /// <summary>
        /// 医疗器械
        /// </summary>
        [Description("医疗器械")]
        MedicalEquipment = 5,

        /// <summary>
        /// 消毒产品
        /// </summary>
        [Description("消毒产品")]
        Disinfection = 6,

        /// <summary>
        /// 卫生用农药
        /// </summary>
        [Description("卫生用农药")]
        HouseholdPesticides = 7,

        /// <summary>
        /// 3c认证产品
        /// </summary>
        [Description("3c认证产品")]
        CCC = 8,

        /// <summary>
        /// 其他日用品
        /// </summary>
        [Description("其他日用品")]
        Other = 0
    }
}

